package com.huangpuweb.task.controller;

import com.huangpuweb.task.model.ZyDwdDtReworkPersonHpq;
import com.huangpuweb.task.service.SyncReworkDataService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.List;


/**
 * 1、同步复工企业、复工人员数据
 * 2、将hp_rework_company_resource、hp_rework_building两张表进行联查，清洗出企业与楼栋数据，存入hp_rework_company数据表中
 * 3、hp_rework_company、hp_rework_person_resource表进行清洗，将结果存入hp_rework数据表中
 */
@Controller
public class SyncReworkDataJob {

    private static Logger logger = Logger.getLogger(SyncReworkDataJob.class);
    private SyncReworkDataService syncReworkDataService;

    @Autowired
    public void setSyncReworkDataService(SyncReworkDataService syncReworkDataService) {
        this.syncReworkDataService = syncReworkDataService;
    }

    public void syncReworkDataTask() throws Exception {

        /**
         * 同步资源库中的复工人员数据表hp_rework_person_resource
         * @param flag 同步全部（all）当日最新(null)
         */

        List<ZyDwdDtReworkPersonHpq> listZyDwdDtReworkPersonHpq=syncReworkDataService.getListZyDwdDtReworkPersonHpq();



//        syncReworkDataService.syncReworkCompanyResource(null);
//        syncReworkDataService.cleanReworkCompany();
//        syncReworkDataService.cleanReworkNewData();

    }


}
